<!-- inc:frame.top -->

<!-- if($act=="list") -->
<div class="position"><p><!-- inc:position --> &raquo; 其他管理 &raquo; 在线客服</p><!-- inc:position.fr --></div>

<div class="page_pad">
  <div class="content_add"><button class="gbutton gbutton_dblue gbutton_add" type="button" onclick="qgurl('{:$mainlink}?file=online&act=view')">添加客服</button> <button class="gbutton gbutton_dblue gbutton_add" type="button" onclick="qgurl('{:$mainlink}?file=online&act=orderlist')">客服排序</button> <button class="gbutton gbutton_dblue gbutton_add" type="button" onclick="qgurl('{:$mainlink}?file=online&act=style')">客服样式</button></div>

  <div class="content_box">
    <div class="content_bor">
      <table class="ltable">
        <tr class="first">
          <td>序号</td>
          <td>账号类型</td>
          <td>账号</td>
          <td width="220">操作</td>
        </tr>
        <!-- $onlinelist AS $key=>$value -->
        <tr>
          <td>{:$value[row_index]}</td>
          <td>
            <!-- if($value[type]=="tel") -->电话
            <!-- elseif($value[type]=="fax") -->传真
            <!-- elseif($value[type]=="qq") -->QQ
            <!-- elseif($value[type]=="wechat") -->微信
            <!-- elseif($value[type]=="email") -->邮箱
            <!-- elseif($value[type]=="qrcode") -->二维码
            <!-- elseif($value[type]=="skype") -->Skype
            <!-- elseif($value[type]=="facebook") -->脸书
            <!-- elseif($value[type]=="twitter") -->推特
            <!-- elseif($value[type]=="linkin") -->领英
            <!-- elseif($value[type]=="whatapp") -->Whatapp
            <!-- elseif($value[type]=="pinterest") -->Pinterest
            <!-- elseif($value[type]=="youtube") -->Youtube
            <!-- end -->
          </td>
          <td>{:$value[name]}</td>
          <td>
            <button class="gbutton" onclick="qg_view({:$value[id]})">编辑</button>
            <button class="gbutton" onclick="qg_delete({:$value[id]})">删除</button>
          </td>
        </tr>
        <!-- end -->
      </table>
    </div>
  </div><!--content_box-->
  <table class="qg_notice">
    <tr>
      <td>前台调用代码：&lt;!-- run:$online = QGMOD_ONLINE() --&gt;</td>
    </tr>
  </table>
</div><!--page_pad-->

<script type="text/javascript">
function qg_check(id)
{
	qgurl("{:$mainlink}?file=online&act=status&id="+id);
}
function qg_view(id)
{
	qgurl("{:$mainlink}?file=online&act=view&id="+id);
}
function qg_delete(id)
{
	//判断是否删除
	url = "{:$mainlink}?file=online&act=delete&id="+id;
	tip_confirm("确认删除该信息吗？特别说明，删除后无法恢复！",url);
}
</script>

<!-- elseif($act=="view") -->
<div class="position"><p><!-- inc:position --> &raquo; 其他管理 &raquo; <a href="{:$mainlink}?file=online&act=list">在线客服</a><!-- if($id) --> &raquo; [{:$rs[type]}] {:$rs[name]}<!-- end --></p><!-- inc:position.fr --></div>

<div class="page_pad">
  <form method="post" action="{:$mainlink}?file=online&act=viewok&id={:$id}" onsubmit="return chkadd(this);">
  <div class="content_box">
    <div class="content_bor">
      <table class="ctable">
        <tr>
          <td class="left">客服类型：<span style="color:red;">*</span></td>
          <td class="right">
            <select name="type" id="type" onchange="picshow(options[selectedIndex].value)">
              <option value="tel" {if($rs[type]=="tel")}selected="selected"{end}>电话</option>
              <option value="fax" {if($rs[type]=="fax")}selected="selected"{end}>传真</option>
              <option value="qq" {if($rs[type]=="qq")}selected="selected"{end}>QQ</option>
              <option value="wechat" {if($rs[type]=="wechat")}selected="selected"{end}>微信</option>
              <option value="email" {if($rs[type]=="email")}selected="selected"{end}>邮箱</option>
              <option value="qrcode" {if($rs[type]=="qrcode")}selected="selected"{end}>二维码</option>
              <option value="skype" {if($rs[type]=="skype")}selected="selected"{end}>Skype</option>
              <option value="facebook" {if($rs[type]=="facebook")}selected="selected"{end}>脸书</option>
              <option value="twitter" {if($rs[type]=="twitter")}selected="selected"{end}>推特</option>
              <option value="linkin" {if($rs[type]=="linkin")}selected="selected"{end}>领英</option>
              <option value="whatapp" {if($rs[type]=="whatapp")}selected="selected"{end}>Whatapp</option>
              <option value="pinterest" {if($rs[type]=="pinterest")}selected="selected"{end}>Pinterest</option>
              <option value="youtube" {if($rs[type]=="youtube")}selected="selected"{end}>Youtube</option>
            </select>
          </td>
        </tr>
        <tr>
          <td class="left">客服号码：</td>
          <td class="right"><input class="ginput" type="text" name="name" id="name" value="{:$rs[name]}"></td>
        </tr>
        <tr>
          <td class="left">英文客服号码：</td>
          <td class="right"><input class="ginput" type="text" name="name_en" id="name_en" value="{:$rs[name_en]}" placeholder="若中英文版一样则不需要填写，不一样则填写此项"></td>
        </tr>
        <!--if($system[jianti] == on) -->
        <tr>
          <td class="left">中文显示名称：</td>
          <td class="right"><input class="ginput" type="text" name="cusname" id="cusname" value="{:$rs[cusname]}"></td>
        </tr>
        <!-- end -->
        <!--if($system[fanti] == on) -->
        <tr>
          <td class="left">繁体显示名称：</td>
          <td class="right"><input class="ginput" type="text" name="cusname_ft" id="cusname_ft" value="{:$rs[cusname_ft]}"></td>
        </tr>
        <!-- end -->
        <!--if($system[english] == on) -->
        <tr>
          <td class="left">英文显示名称：</td>
          <td class="right"><input class="ginput" type="text" name="cusname_en" id="cusname_en" value="{:$rs[cusname_en]}"></td>
        </tr>
        <!-- end -->
        <tr>
          <td class="left">链接：</td>
          <td class="right"><input class="ginput" type="text" name="link" id="link" value="{:$rs[link]}"></td>
        </tr>
        <tr id="picshow" {if($rs[type]!="qrcode")}style="display:none;"{end}>
          <td class="left">二维码：</td>
          <td class="right">
            <div id="rsdpic"><img id="rsdimg" src="{:$rsd[folder]}{:$rsd[thumbfile]}" style="{if($rsd[thumbfile])}height:100px;{else}height:0;{end} cursor:pointer" onclick="preview_thumb();" /></div>
            <span><button class="gbutton gbutton_min" type="button" onclick="qg_openthumb();">图片</button></span>
            <span id="del_thumb" style="display:none;">
            <button class="gbutton gbutton_min" type="button" onclick="preview_thumb();">预览</button>
			<button class="gbutton gbutton_min" type="button" onclick="delete_thumb();">删除</button>
            </span>
            <input type="hidden" name="thumb" id="thumb" value="{:$rs[thumb]}">
          </td>
        </tr>
        <tr>
          <td class="left">默认宽度：</td>
          <td class="right"><input class="ginput" type="text" name="width" id="width" value="{if($rs[width])}{:$rs[width]}{else}190{end}"></td>
        </tr>
      </table>
    </div>
  </div><!--content_box-->
  
   <div class="gbutton_div"><button type="submit" class="gbutton gbutton_dblue gbutton_add" id="creat_button">提交</button> &nbsp; <button type="button" class="gbutton gbutton_add" onclick="qgurl('{:$mainlink}?file=online&act=list')">返回</button> &nbsp; <span id="show_step" style="color:red;"><img src="images/loading.gif" style="visibility:hidden;" /></span></div>
  </form>
</div><!--page_pad-->

<script type="text/javascript">
function picshow(id)
{
	if(id=="qrcode")
	{
		document.getElementById("picshow").style.display="";
	}
	else
	{
		document.getElementById("picshow").style.display="none";
	}
}
function qg_openthumb()
{
	var values = document.getElementById("thumb").value;
	var url;
	url = "{:$mainlink}?file=open.addthumb&act=add&values=" + values;
	qg_open(url,"540");
}
function preview_thumb()
{
	var values = document.getElementById("thumb").value;
	var url;
	url = "{:$mainlink}?file=open.viewpic&id=" + values + "&type=thumb";
	qg_open(url,"540");
}
function delete_thumb()
{
	document.getElementById("thumb").value = "";
	document.getElementById("del_thumb").style.display = "none";
	document.getElementById("rsdimg").src = "";
	document.getElementById("rsdimg").style.height = "0";
}

/**********************************/

function chk_thumb()
{
	var values = document.getElementById("thumb").value;
	if(values && values != "0")
	{
		document.getElementById("del_thumb").style.display = "";
	}
}
chk_thumb();

function chkadd(o)
{
	document.getElementById("show_step").innerHTML = "<img src='images/loading.gif' border='0' align='absmiddle'> 正在保存数据，如果网页没有动静请刷新...";
	document.getElementById("creat_button").disabled=true;
}
</script>

<!-- elseif($act=="style") -->
<div class="position"><p><!-- inc:position --> &raquo; 其他管理 &raquo; <a href="{:$mainlink}?file=online&act=list">在线客服</a> &raquo; 客服样式</p><!-- inc:position.fr --></div>

<div class="page_pad">
  <form name="qgform" method="post" action="{:$mainlink}?file=online&act=styleok&id={:$rs[id]}">
  <div class="content_box">
    <div class="content_bor">
      <table class="ctable">
        <tr>
          <td class="left">背景颜色：</td>
          <td class="right"><input class="ginput" type="text" name="bgcolor" id="bgcolor" value="{:$rs[bgcolor]}" /></td>
        </tr>
        <tr>
          <td class="left">鼠标经过颜色：</td>
          <td class="right">
            <input class="ginput" type="text" name="hovercolor" id="hovercolor" value="{:$rs[hovercolor]}" />
            &nbsp; 
            <span>[十六进制颜色代码，例如：#3d3d3d 或 blue]</span>
          </td>
        </tr>
      </table>
    </div>
  </div><!--content_box-->
  
  <div class="gbutton_div"><button type="submit" class="gbutton gbutton_dblue gbutton_add">提交</button> <button type="button" class="gbutton gbutton_add" onclick="qgurl('{:$mainlink}?file=online&act=list')">返回</button></div>
  </form>
</div><!--page_pad-->

<!-- elseif($act=="orderlist") -->
<div class="position"><p><!-- inc:position --> &raquo; 其他管理 &raquo; <a href="{:$mainlink}?file=online&act=list">在线客服</a> &raquo; 客服排序</p><!-- inc:position.fr --></div>

<SCRIPT language="Javascript" src="js/sort.js"></SCRIPT>
<script language="javascript">
 function changese(obj){
  window.location.href="{:$mainlink}?file=msg&act=orderlist&sysgroupid={:$sysgroupid}&cateid="+obj.value;
 }
</script>

<script language="javascript">
function OutSort(form)
{
	var j =  new Array(form.updownlist.options.length);
	for(i=0;i<form.updownlist.options.length;i++)
	{
		j[i] = form.updownlist.options[i].value+"=";
	}
	
	var g = "";
	for(i=0;i<j.length;i++)
	{
		g = g+j[i];
	}
	document.productsTypeActionForm.listlayer.value=g;
}
</script>

<div class="toptitle clear"><a href="{:$mainlink}?file=index" class="toptitle_left">系统首页</a>&raquo;
	&raquo; 客服管理	
	<input class="global_btn" type="button" value="添加客服" onclick="qgurl('{:$mainlink}?file=online&act=view')">
    <input class="global_btn" type="button" value="客服排序" onclick="qgurl('{:$mainlink}?file=online&act=orderlist')">
    <input class="global_btn" type="button" value="客服窗样式" onclick="qgurl('{:$mainlink}?file=online&act=style')">
</div>

<form action="{:$mainlink}?file=online&act=orderbyok" enctype="multipart/form-data" onsubmit="javascript:OutSort(this);"  method="post" name="productsTypeActionForm">
<Table class="tableBorder" cellSpacing="1" cellPadding="3" width="100%" align="center" border="0" style="margin-top:10px;">
<Tbody>
	<Tr>
		<Td class="forumRow" vAlign="top" align="middle" height="141">
			<div align="left">
				<table width="100%" border="0">
				<tbody>
					<tr>
						<td width="494" height="14"><div align=center>目前现有类别(中)如下</div></td>
						<td vAlign="center" align="middle"><div align="center">请按<font color="#ff0000">箭头方向</font>单击按钮进行操作</div></td>
					</tr>
					<tr>
						<td height="65">
							<div align="center">
								<select name="updownlist" multiple size="18" id="updownlist" style="width:300px;">
								<!-- $onlinelist AS $key=>$value -->
								<option class="myinput4" value="{:$value[id]}">{:$value[id]}.【{:$value[type]}】{:$value[name]}</option>
								<!-- end -->
								</select>
							</div>
						</td>
						<td vAlign="center" align="middle" width="497">
							<div align="center">
							<table>
							<tbody align="center">
							<tr style="height:25px;">
								<td colspan="3"><input class="global_btn myinput2" id="button" onclick="moveOptionFirst(this.form.updownlist)" type="button" value="▲放置最首" name="button" /></td>
							</tr>
							<tr style="height:25px;">
								<td><input class="global_btn myinput2" onclick="moveOptionUp(this.form.updownlist)" type="button" value="↑向上移动" name="button" /></td>
								<td>&nbsp;</td>
								<td><input class="global_btn myinput2" onclick="moveOptionDown(this.form.updownlist)" type="button" value="↓朝下移动" name="button" /></td>
							</tr>
							<tr style="height:25px;">
								<td colspan="3"><input class="global_btn myinput2" id="button" onclick="moveOptionLast(this.form.updownlist)" type="button" value="▼移动最底" name="button" /></td>
							</tr>
							<tr style="height:25px;">
								<td colspan="3"><input class="global_btn myinput2" id="button" onclick="moveOptionUpSideDown(this.form.updownlist)" type="button" value="▲倒序排列" name="button" /></td>
							</tr>
							</tbody>
							</table>
							</div>
						</td>
					</tr>
					<tr>
						<td colSpan="2">
							<div align="center"><font size="2"><input class="global_btn" type="submit" value="确认" name="sortlist" style="width:50px;" onclick="for(i=0;i<updownlist.options.length;i++)updownlist.options(i).selected=true" />&nbsp; <input class="global_btn" id="reset" onclick="qgurl('{:$mainlink}?file=online&act=list')" type="button" value="返回" style="width:50px;" name="back" /></font></div>
						</td>
					</tr>
					<tr>
						<td colSpan="2"><div class="style1" align="center">单击此确认您目前的排序操作</div></td>
					</tr>
					<tr>
						<td colSpan="2">
							<div align="center"></div>
						</td>
					</tr>
				</Tbody>
				</Table>
			</div>
		</Td>
	</Tr>
</Tbody>
</Table>
<input name="listlayer" type="hidden" /><input type="hidden" value="<?=$_GET['ctid']?>" name="ctid" />

</form>
<!-- end -->

<!-- inc:frame.bottom -->